package cn.tedu.csmall.product.mapper;

import cn.tedu.csmall.product.pojo.entity.Brand;
import cn.tedu.csmall.product.pojo.vo.BrandListItemVO;
import cn.tedu.csmall.product.pojo.vo.BrandStandardVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface BrandMapper {
    int insert(Brand brand);

    int insertBatch(List<Brand> brand);

    int deleteById(Long id);

    int deleteByIds(Long[] id);

    int update(Brand brand);

    int countByName(String name);

    int countByNameAndNotId(@Param("name")String name,
                            @Param("id")Long id);

    BrandStandardVO getStandardById(Long id);

    List<BrandListItemVO> list();
}
